<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <body class="tundra">
            <br>

            <div id="searchuser">
             <label for="username">按用户名检索:</label>
             <input name="username" dojoType="dijit.form.TextBox" jsId="searchuser_username" value="" intermediateChanges="true" trim="true" required="true">
             <button dojoType="dijit.form.Button" type="submit" name="submitButton" value="Submit">添加
                <script type="dojo/method" event="onClick">
                  searchUserForTable();
                </script>
             </button>
            </div>

            <button dojoType="dijit.form.Button" jsId="previousUserButton">上一页
                <script type="dojo/method" event="onClick">     
                     previous();
                </script>
            </button>
            <button dojoType="dijit.form.Button" jsId="nextUserButton">下一页
                <script type="dojo/method" event="onClick">
                  next();
                </script>
            </button>
        <span dojoType="dojo.data.ItemFileWriteStore" jsId="store3" url="searchuser.action?currentPage=0">
        </span>
        <table dojoType="dojox.grid.DataGrid"  jsId="grid6" store="store3" query="{username: '*' }"
        rowsPerPage="20" clientSort="true" style="width: 100%; height: 100%;" rowSelector="20px">
            <script type="dojo/method" event="onStyleRow" args="row">
                var item = grid6.getItem(row.index);
                if (item) {
                    var type = store3.getValue(item, "type", null);
                    if (type == "continent") {
                        row.customStyles += "color:red;";
                    }
                }
                grid6.focus.styleRow(row);
                grid6.edit.styleRow(row);
            </script>
            <thead>
                <tr>
                    <th width="200px" field="username">
                        User Name
                    </th>
                      <th width="100px" field="id">
                        id
                    </th>
                    <th width="auto" field="password" cellType="dojox.grid.cells.Select" options="country,city,continent"
                    editable="true">
                        Type
                    </th>
                </tr>
            </thead>
        </table>
    </body>
</html>